UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6EcEzyUdtKf+3G85Y57HTIEleexGMnRaIAwyXssFgHY='
WHERE
key_id = '75ba6c12a34c00af99ef998aa97cf2d8fdd1cd5f5df56de4b4c265d0c02a27a7'
AND (
token = '6EcEzyUdtKf+3G85Y57HTIEleexGMnRaIAwyXssFgHY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)