UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DC7rkIwQzYbLQLSlsbqdq35/zKsGM9ePy/2Hrq1pVmE='
WHERE
key_id = '62a5d1cb073968affac872b87cffb2ad68372190105a5a671faffb62dff2a776'
AND (
token = 'DC7rkIwQzYbLQLSlsbqdq35/zKsGM9ePy/2Hrq1pVmE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)