UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FOBjJBlxZGxuw/e4aPxy4B/KqS1XqUQpk+oOfak3nJQ='
WHERE
key_id = '52ac4cefef332470fe510ce1c70380c448cc76838a4d74921b47a0336fc2d0ca'
AND (
token = 'FOBjJBlxZGxuw/e4aPxy4B/KqS1XqUQpk+oOfak3nJQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)