UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8XXugrKzaGtKJ0WJjdpVNfBd57vV3JoOPzYRLW2QTaY='
WHERE
key_id = '7fdf6fb054f8d9bfdba74270b037a9df3eed0ee9df39b5d30c4ca05a9bc4bb44'
AND (
token = '8XXugrKzaGtKJ0WJjdpVNfBd57vV3JoOPzYRLW2QTaY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)