UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'i4i/RcpgH9KX1444EqHQ33H+V4fxB0/zBQ96RKATOSs='
WHERE
key_id = 'd5282e2d5074a5dc9d7e361b59bd3db492040e65f58e2a10b0aee5186dacf9b9'
AND (
token = 'i4i/RcpgH9KX1444EqHQ33H+V4fxB0/zBQ96RKATOSs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)