UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PV+rZpoMuBS4Mb+WJ44pDcuBEsu0gMnXyA2+oTKXyFQ='
WHERE
key_id = '860365679d7cbc481a4a64af801025d1a9d150434b280fc85f28577dd798ff6c'
AND (
token = 'PV+rZpoMuBS4Mb+WJ44pDcuBEsu0gMnXyA2+oTKXyFQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)