UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'chumRzmwN9p2J6I/orXomcJ/inFsEUT3YaSrAAO3Nyc='
WHERE
key_id = '37efe4abdb4d3b68440c752e7428b9a901717cbd46b7a15b2dcc4cf46351a434'
AND (
token = 'chumRzmwN9p2J6I/orXomcJ/inFsEUT3YaSrAAO3Nyc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)