UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ulwbxXIZW9ExZkVk76bS+7sqtOO7DzTcEPCIjJAlPPo='
WHERE
key_id = '60ac917ee3b4b8893f85ea89e136382ebef62c78d86c6b60c292e59a582fe2f3'
AND (
token = 'ulwbxXIZW9ExZkVk76bS+7sqtOO7DzTcEPCIjJAlPPo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)