UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pOcGX1IAGRGGmtf3BIUtA4Tdtia+f/5CwMrnqwbAZiE='
WHERE
key_id = 'd905ea2e7f2d3b9148657b000c82a496065271b546f77580b753a912c404d05f'
AND (
token = 'pOcGX1IAGRGGmtf3BIUtA4Tdtia+f/5CwMrnqwbAZiE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)