UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 's7c/lwbpoT7zuCSBX2QZxtQFDRLs+FbeHHq6WAjbp1I='
WHERE
key_id = '4fcffc51e725e6fa43390f84d10304a5be1a0f838b2ce230c26554a8697e0ae5'
AND (
token = 's7c/lwbpoT7zuCSBX2QZxtQFDRLs+FbeHHq6WAjbp1I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)