UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4SUEgBriV0qdrRlFDbgypCNvCcXCXvmf3tYFN08JpSI='
WHERE
key_id = 'c930987ec71d1030078a0627f011d2886fc9ce9e10f3ce3c7d0b01e607f24dc3'
AND (
token = '4SUEgBriV0qdrRlFDbgypCNvCcXCXvmf3tYFN08JpSI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)