UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vyDzrrMXL0EBkBFIv/89wcEKS7qs5ZI4xjVdbFDWjsk='
WHERE
key_id = '63fbfafd74f2ae089ca8dd7a8e238b1ce04ebb4a452dbe1ab266f12f7f7c959d'
AND (
token = 'vyDzrrMXL0EBkBFIv/89wcEKS7qs5ZI4xjVdbFDWjsk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)