UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Hgorx9llzx6N1/fRG+PVVoeHhG62FAM/hxo0fkltT8I='
WHERE
key_id = '019e7e99c7bab93ac827537863440d59b1dc11cc7367cef72ee0000ba6705ff1'
AND (
token = 'Hgorx9llzx6N1/fRG+PVVoeHhG62FAM/hxo0fkltT8I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)