UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Qo4eatNQCnu7W3XxQHRCBc2HbmmPn8A9A0ZEsEnUNck='
WHERE
key_id = '050ad1930f9986b5a30a4e20d0d0dadfa6b3d23216ba28663ce23d77e0e64183'
AND (
token = 'Qo4eatNQCnu7W3XxQHRCBc2HbmmPn8A9A0ZEsEnUNck='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)