UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RVxuBq8mdakxzqTF21/Bfh5aCzFNo7VR4SBIHxvdlcI='
WHERE
key_id = '0f90718d35e30471725eaa2abdb34d9af9803cd71ddfad0efaaf4465c1142a56'
AND (
token = 'RVxuBq8mdakxzqTF21/Bfh5aCzFNo7VR4SBIHxvdlcI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)