UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/MpszNdpNSiUtmlE1hqh0osN4a5VGhITvkKmoStd05s='
WHERE
key_id = '54de7acc5d5140b99a30423863dcbdcbf7fdf0b7cbe761a4eacbe00d0d5b463d'
AND (
token = '/MpszNdpNSiUtmlE1hqh0osN4a5VGhITvkKmoStd05s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)