UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kFDUSCtr1xoW/abnpc689U551fZZk4T7XoyleE1PRkc='
WHERE
key_id = 'c48089f448e4d6bd277ca8ed467ccc2730e78e2bc416e86177dd0e3126421ca3'
AND (
token = 'kFDUSCtr1xoW/abnpc689U551fZZk4T7XoyleE1PRkc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)