UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fpPb2DdLE+nxLNo/gvtO0qosvrMjvHQJxdimPRpQQNs='
WHERE
key_id = '2591bd0ed0a65b4f5e4fad72dfe25dd0af7e57e3d78ea8539d0ffd6de11c34e1'
AND (
token = 'fpPb2DdLE+nxLNo/gvtO0qosvrMjvHQJxdimPRpQQNs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)