UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'S0sOsIevZr8w/b0tLW27r6CRx+nzmXBC3rslM3/wAms='
WHERE
key_id = '18675956ab1db5260b08587587904c07e00209f304d3302fa98203e316ad06c0'
AND (
token = 'S0sOsIevZr8w/b0tLW27r6CRx+nzmXBC3rslM3/wAms='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)