UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VDkxhgeGbFVTvCLL2rPV9YofkeZgbreB4MbeB+fClFg='
WHERE
key_id = '12ceb003bf3db2e6188eeaa904c1af5947a75a50d18150dfbe6d6153b508c2e5'
AND (
token = 'VDkxhgeGbFVTvCLL2rPV9YofkeZgbreB4MbeB+fClFg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)