UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'voKrftsmht3m45DaLu5D7rrnRJxhs+kG4qi5eMZ50FM='
WHERE
key_id = '90612ad1c1540613050b268edb1722a5c6babd71ce8e6848e6befeec163f1fa4'
AND (
token = 'voKrftsmht3m45DaLu5D7rrnRJxhs+kG4qi5eMZ50FM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)