UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pli7T/9FT5YQF9Y0H6l/nndVc04nZbL8h1RNfyvd1Zw='
WHERE
key_id = '63a31dcf44c24d27f1a689f866794ebe0a107d35d5ab0095f9fa3692bd62bedc'
AND (
token = 'pli7T/9FT5YQF9Y0H6l/nndVc04nZbL8h1RNfyvd1Zw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)