UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xtyxjPGER8Jcd49Qumj2v/1/yD2ZOlmQtbYVoGzDAXk='
WHERE
key_id = '35cbe131d5f7e9487e8aad0bc81cf9bc8d7a45705d4dcc44d87e759b326a610b'
AND (
token = 'xtyxjPGER8Jcd49Qumj2v/1/yD2ZOlmQtbYVoGzDAXk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)