UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jjUF8W4OM9/sQ5WxvbEUBOB1aNzx0I1zllcjeQsIvDY='
WHERE
key_id = '433bcefe966b3f03badddb6018a1dbad7cc36e4900744fc6b76937a24a92b6cd'
AND (
token = 'jjUF8W4OM9/sQ5WxvbEUBOB1aNzx0I1zllcjeQsIvDY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)