UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VxFaf/lsvKhi2upV+98oTB/WQD+LPFJ84UPUs/4s+q0='
WHERE
key_id = '429a3e4dbf123510e381ca91c4bda0d8626909ef2a3e0a753e46e1b27c19eaf3'
AND (
token = 'VxFaf/lsvKhi2upV+98oTB/WQD+LPFJ84UPUs/4s+q0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)