UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NTH3utl4SL69DxMPTFuwVuFbnNDMZQJZwt7/Udvj53E='
WHERE
key_id = '92a12e61f431680e966709231bff10d18b45feff42e72674f85cc42e7a9ca3c4'
AND (
token = 'NTH3utl4SL69DxMPTFuwVuFbnNDMZQJZwt7/Udvj53E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)