UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/c7pI/kmcbSYqtcd4I3rdWL1+VGDxTZVOz/yEwWtQSc='
WHERE
key_id = '62a639af7bb6040c08bc8280b06d3fd9814b74e07f16e520df49d69760872560'
AND (
token = '/c7pI/kmcbSYqtcd4I3rdWL1+VGDxTZVOz/yEwWtQSc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)