UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ck5XnOWcuzoQ/C38nnwhm7OLgqCNBPC2sm1/3s8NcqM='
WHERE
key_id = 'c380b5898c149aa82c491ea053dd2e3c08e3e309760b71c61945b97d5f1dcb62'
AND (
token = 'Ck5XnOWcuzoQ/C38nnwhm7OLgqCNBPC2sm1/3s8NcqM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)