UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UrhyppjJ6mPZgYlKewnp1CvmykCntQaTSQT/q1Y4u5s='
WHERE
key_id = '8b6ea26ddfd3a605503dade83efa6d4a266a487474394512e756001571cdd37a'
AND (
token = 'UrhyppjJ6mPZgYlKewnp1CvmykCntQaTSQT/q1Y4u5s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)