UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'x236Fmby5bz9CBU9CfrJ1OMx8OvBPdWKxtsIq4+jJQw='
WHERE
key_id = '68b48919f803077b627ad1024c3425d448783e25acd6620fb3c952c90f6959f6'
AND (
token = 'x236Fmby5bz9CBU9CfrJ1OMx8OvBPdWKxtsIq4+jJQw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)