UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '553uwdiYwhIFFRoTsJOZ29wmN649m53EADpdq1Xm8EM='
WHERE
key_id = '079949fa87ab924671c98ec80985e59ca61a2e685de6f793b9b2e50809f6ab05'
AND (
token = '553uwdiYwhIFFRoTsJOZ29wmN649m53EADpdq1Xm8EM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)