UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mNYA5+08JmieXKiprHY0Yj2qk/asJHvqIvvW/KM/tQ8='
WHERE
key_id = '8f833edc4c630b6a0b614acddb7ae5dcb5b0dd68aac1c8ec8452c9d25e65dfa6'
AND (
token = 'mNYA5+08JmieXKiprHY0Yj2qk/asJHvqIvvW/KM/tQ8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)