UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4b8UboGF/N2lYWDlXt++n22HN0xryj1EmeSAvGUdrog='
WHERE
key_id = '66ad2b0792d65960c57394c6f3d6c1cc43ee4058011d198d2c4fc2f2ce67bc44'
AND (
token = '4b8UboGF/N2lYWDlXt++n22HN0xryj1EmeSAvGUdrog='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)